package me.xmaples.flink

import org.apache.flink.api.scala._

object LetterCount {
  def main(args: Array[String]): Unit = {
//    val env=ExecutionEnvironment.createLocalEnvironment()
    val env=ExecutionEnvironment.getExecutionEnvironment

    env.readTextFile(exmapleTextFile)
      .flatMap{ln=>ln.filter(_.isLetter)}
      .map((_,1))
      .groupBy(0)
      .sum(1)
      .print()

    println("main done")
  }
}
